package com.lyl.security.common.sercurity.controller;

import com.lyl.security.common.sercurity.model.dto.UserDTO;
import com.lyl.security.common.sercurity.service.LoginService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class LoginController {
    private final LoginService loginService;

    @PostMapping("/login")
    public String login(@RequestBody UserDTO dto){
        return loginService.login(dto);
    }
}
